function DrawBoard(config){
	config = config || {};
	this.canvasId = config.canvasId;
	this.saveButtonId = config.saveButtonId;
	this.saveRequestURL = config.saveRequestURL;
	this.uploadImageButtonId = config.uploadImageButtonId;
	this.uploadImageRequestURL = config.uploadImageRequestURL;
	this.canvas = $("#"+this.canvasId);
	this.panel = new Panel(this.canvas);
	this.brush = new Brush();
	
	this.panel.setTool(this.brush);

	var that = this;
	$("#"+this.canvasId).click(function(e){
		var imageURL = canvas[0].toDataURL("image/png");
		$.ajax({
			type: "post",
			data: imageURL,
			url: that.saveRequestURL,
			contentType: "application/upload",
			success: function(result){
				console.log(result);
			},
			error: function(){
				console.log("save doodle error.");
			}
		});
	});

	$("#"+this.uploadImageButtonId).click(function(e){

	});
}
